<div class="page_title">
    <h2 class="fl">{$pageTitle}</h2>
</div>
<section>
    <ul class="admin_tab">
        <li><a class="active">直播筛选</a></li>
        <li><a>回放筛选</a></li>
    </ul>
    <!--tabCont-->
    <div class="admin_tab_cont" style="display:block;">
        <table class="table">
            <tr>
                <th>选项</th>
                <th>描述</th>
                <th>当前状态</th>
            </tr>
            {volist name="live_list.data" id="vo"}
            <tr>
                <td class="center">{$vo.value.desc}</td>
                <td>{$vo.description}</td>
                <td>
                    <input type="checkbox" id="checkbox_live{$i}" data-config_id="{:encrypt_id($vo.config_id)}" class="chk_4 conf_status" {eq name='vo.status' value='1'}checked{/eq} />
                    <label for="checkbox_live{$i}">
                        <input type="hidden" value="{$vo.status}" />
                    </label>
                </td>
            </tr>
            {/volist}
        </table>
    </div>
    <div class="admin_tab_cont">
        <table class="table">
            <tr>
                <th>选项</th>
                <th>描述</th>
                <th>当前状态</th>
            </tr>
            {volist name="video_list.data" id="vo"}
            <tr>
                <td class="center">{$vo.value.desc}</td>
                <td>{$vo.description}</td>
                <td class="center">
                    <input type="checkbox" data-config_id="{:encrypt_id($vo.config_id)}" id="checkbox_video{$i}" class="chk_4 conf_status" {eq name='vo.status' value='1'}checked{/eq} />
                    <label for="checkbox_video{$i}">
                        <input type="hidden" value="{$vo.status}"  />
                    </label>
                </td>
            </tr>
            {/volist}
        </table>
    </div>
</section>
<script>
$(function(){
    $(".conf_status").bind('click',function(){
        var status = $(this).is(":checked") ? 1 : 0;
        var config_id = $(this).data('config_id');
        var send_data = {
            url:U('admin/Config/saveStatus'),
            type:'POST',
            data:{
                status:status,
                config_id:config_id
            }
        }
        send_ajax(send_data,function(res){
            if(res.status){
                //msg_success(res.data.info);
                return true;
            }else{
                msg_error(res.message);
            }
        });
    });
})
</script>